
from abc import ABCMeta,abstractmethod
class FemaleA():
    def __init__(self,name):
        self.name =name

class Male():
    __metaclass__ = ABCMeta

    @abstractmethod
    def send_flower(self):
        pass

    @abstractmethod
    def send_chocolate(self):
        pass
    @abstractmethod
    def send_book(self):
        pass


class MaleA(Male):
    def __init__(self,name,love_female):
        self.name = name
        self.love_female = FemaleA(love_female)
    def send_flower(self):
        print(self.name +"send flow "+self.love_female.name)
    def send_chocolate(self):

        print(self.name +"send chocolate "+self.love_female.name)
    def send_book(self):
        print(self.name +"send book "+self.love_female.name)

class Proxy(Male):
    def __init__(self,name,proxyed_name,love_female):
        self.name = name
        self.proxyed = MaleA(proxyed_name,love_female)
    def send_flower(self):
        print(self.name +" 留了一朵")
        self.proxyed.send_flower()
    def send_chocolate(self):
        print(self.name + " 吃了一口")
        self.proxyed.send_chocolate()
    def send_book(self):
        self.proxyed.send_book()


p = Proxy("boyB","boyA","girlA")
p.send_book()
p.send_chocolate()
p.send_flower()

